<template>
  <div>
    <div class="swrap">
      <van-swipe class="my-swipe" :autoplay="3000">
        <van-swipe-item v-for="banner in banners" :key="banner.id">
          <img :src="banner.picUrl" alt="" />
        </van-swipe-item>
      </van-swipe>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    banners: {
      type: Array,
      required: true
    }
  }
}
</script>

<style lang="scss" scoped>
.swrap {
  padding-top: 46px;
  .my-swipe {
    width: 100%;
    img {
      width: 100%;
    }
  }
}
</style>
